package com.htudata.history.service;

import com.alibaba.fastjson.JSONArray;
import java.util.List;

import com.htudata.history.dao.HistoryDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HisService {

  @Autowired
  private HistoryDao historyDao;
  
  public JSONArray getHistoryAndChangeByItemId(List<Object> itemList, String tableName) {
    return this.historyDao.selectHistoryAndChangeByItemId(itemList, tableName);
  }
  
  public JSONArray getHisAndChangeByItemId(List<Object> itemList, String tableName, int needChangeValue, long startTime) {
    return this.historyDao.selectHisAndChangeByItemId(itemList, tableName, needChangeValue, startTime);
  }
  
  public JSONArray getHistoryByItemId(List<Object> itemList, String tableName) {
    return this.historyDao.selectHistoryByItemId(itemList, tableName);
  }
  
  public JSONArray getHisByItemId(List<Object> itemList, String tableName) {
    return this.historyDao.selectHisByItemId(itemList, tableName);
  }
}
